#include<bits/stdc++.h>
#define int long long
#define pii pair<int,int>
#define fi first
#define sd second
using namespace std;
const int N=2e5+5;
inline int read(){
	int x=0,f=1;char ch=getchar();
	while(!isdigit(ch)){if(ch=='-')f=-1;ch=getchar();}
	while(isdigit(ch)){x=(x<<1)+(x<<3)+ch-48,ch=getchar();}
	return x*f;
}
int id,n,q,xa[N],ya[N],xb[N],yb[N];
int lsh[N],tot;
multiset<pii > s;
vector<pii > add[N],del[N]; 

signed main(){
	freopen("dierti.in","r",stdin);
	freopen("dierti.out","w",stdout);
	id=read();
	n=read(),q=read();
	for(int i=1;i<=n;i++) xa[i]=read(),ya[i]=read(),xb[i]=read(),yb[i]=read();
	int res=0;
	while(q--){
		int l=read(),r=read();res+=r-l+1;
		tot=0,s.clear();
		for(int i=l;i<=r;i++) lsh[++tot]=xa[i],lsh[++tot]=xb[i];
		sort(lsh+1,lsh+1+tot);
		tot=unique(lsh+1,lsh+1+tot)-lsh-1;
		for(int i=l;i<=r;i++){
			add[lower_bound(lsh+1,lsh+1+tot,xa[i])-lsh].push_back({ya[i],yb[i]});
			del[lower_bound(lsh+1,lsh+1+tot,xb[i])-lsh].push_back({ya[i],yb[i]});
		}
		int ans=0;
		for(int i=1;i<=tot;i++){
			int sum=0,l=-1,r=-1;
			for(pii pl:s){
				int L=pl.fi,R=pl.sd;
				if(L>r){
					sum+=r-l;
					l=L,r=R;
				}
				else r=max(r,R);
			}
			sum+=r-l;
			ans=ans+(lsh[i]-lsh[i-1])*sum;
			for(pii pl:add[i]) s.insert(pl);
			for(pii pl:del[i]) s.erase(s.find(pl));
			add[i].clear(),del[i].clear();
		}
		printf("%lld\n",ans);
	}
	
	return 0;
}
